package com.fd.fdsso.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 用户帐号登录信息
 * 
 * @author 符冬
 * 
 */
@Entity
public class SSOUserLogin implements Serializable {
	private static final long serialVersionUID = -2349257885107022426L;
	/**
	 * 用户ID
	 */
	@GeneratedValue
	@Id
	private Long loginId;
	/**
	 * 帐号名
	 */
	@Column(length = 50, unique = true, nullable = false)
	private String userName;
	/***
	 * 密码
	 */
	@Column(length = 50, nullable = false)
	private String userPwd;
	/***
	 * 安全邮箱
	 */
	@Column(length = 50, unique = true, nullable = false)
	private String email;
	/***
	 * 安全手机
	 */
	@Column(length = 30, unique = true)
	private String mobile;
	/***
	 * 最后登录时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	private Date lastLoginDate = new Date();
	/**
	 * 最后登录IP地址
	 */
	private String loginIp;
	/***
	 * 登录成功次数
	 */
	private Long loginCount = 0l;
	/**
	 * 帐号是否正常可用
	 */
	private Boolean visibleState = true;

	/**
	 * 当天登录不成功的次数
	 */
	private Integer errorCountPerTime = 0;

	public Long getLoginId() {
		return loginId;
	}

	public void setLoginId(Long loginId) {
		this.loginId = loginId;
	}

	public String getUserName() {
		return userName;
	}

	public Boolean getVisibleState() {
		return visibleState;
	}

	public void setVisibleState(Boolean visibleState) {
		this.visibleState = visibleState;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPwd() {
		return userPwd;
	}

	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public Integer getErrorCountPerTime() {
		return errorCountPerTime;
	}

	public void setErrorCountPerTime(Integer errorCountPerTime) {
		this.errorCountPerTime = errorCountPerTime;
	}

	public Date getLastLoginDate() {
		return lastLoginDate;
	}

	public void setLastLoginDate(Date lastLoginDate) {
		this.lastLoginDate = lastLoginDate;
	}

	public Long getLoginCount() {
		return loginCount;
	}

	public void setLoginCount(Long loginCount) {
		this.loginCount = loginCount;
	}

}
